(define-module (rain suckless)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (gnu packages)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages image)
  #:use-module (gnu packages pkg-config)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  )

(define-public xscreenshot
  (package
    (name "xscreenshot")
    (version "1.0")
    (source (origin
	     (method git-fetch)
	     (uri (git-reference
		   (url "git://git.2f30.org/xscreenshot")
		   (commit "09f10196b609f477adfd6d1692508434954c3566")))
	     (sha256
	      (base32
	       "156cla1g96mvhkwx5aw9z035pvi21k79c1g9zc1irg1rsf1d6rkk"))))
    (build-system gnu-build-system)
    (arguments
     '(#:tests? #f ; no tests
       #:make-flags (list "CC=gcc"
                          (string-append "PREFIX=" %output))
       #:phases
       (modify-phases %standard-phases
         (delete 'configure))))
    (inputs
     `(("libx11" ,libx11)))
    (native-inputs `(("pkg-config" ,pkg-config)))
    (home-page "http://git.2f30.org/xscreenshot/")
    (synopsis "Make screenshot")
    (description
     "xscreenshot is a simple screenshot utility. It writes image data to stdout.")
    (license license:x11)))

(define-public farbfeld
  (package
    (name "farbfeld")
    (version "1")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://dl.suckless.org/farbfeld/farbfeld-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "0vmlq0jii54p751kfpkvpch7nlffjygy1ch40rlhmwlvxrwgiyil"))))
    (build-system gnu-build-system)
    (arguments
     '(#:tests? #f ; no tests
       #:make-flags (list "CC=gcc"
                          (string-append "PREFIX=" %output))
       #:phases (alist-delete 'configure %standard-phases)))
    (inputs
     `(("libjpeg" ,libjpeg)
       ("libpng" ,libpng)))
    (home-page "http://tools.suckless.org/farbfeld/")
    (synopsis "Lossless image file format")
    (description
     "Farbfeld is a lossless image-format designed to be parsed and piped easily. It can be compressed easily and beats PNG's filesize in many cases.")
    (license license:x11)))
